$(function(){
				/*
				//参考上传图片的html代码：  引用的class类名和属性：1.upload-picture  2.data-url="/UpLoad"  3.upload-pictures-input 4.upload-pictures-preview
				<!-- upload-image -->
						<div class="form-item upload-pictures" data-url="/UpLoad">
							<label for="business_license">营业执照：</label>
							<input class="upload-pictures-input" type="text" id="business_license" name="business_license" placeholder="请上传图片" required><button type="button" class="cus-btn cus-btn-md cus-btn-white cus-mg-l-20"><i class="fa fa-file-image-o"></i>上传图片</button>
							<div>
								<img class="upload-pictures-preview" src="http://placehold.it/100x150">
							</div>
						</div>
						<!-- upload-image -->
				 */
				var uploadEditor=null; 
				//显示图片上传对话框
				function showImageUploadDialog($imageId, $hiddenId) {
					uploadEditor.loadPlugin('image', function() {
						uploadEditor.plugin.imageDialog({
			                showRemote:false,
							imageUrl: $hiddenId.val(),
							clickFn: function(url, title, width, height, border, align) {
								$hiddenId.val(url);
								$imageId.attr("src", url);
								uploadEditor.hideDialog();
							}
						});
					});
				}
				$('.upload-pictures').each(function(index,item){
					var $this=$(this);
					if(uploadEditor==null){
						var upUrl=$this.data('url');
						uploadEditor= KindEditor.editor({
							uploadJson : upUrl
						});
					}
					
					var $input=$this.find('.upload-pictures-input');
					var $preview=$this.find('.upload-pictures-preview');
					$this.find('button').click(function(e){
						e.preventDefault();
						showImageUploadDialog($preview,$input);

					});
				});
		});//end $function